﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Maticsoft.DBUtility;
using System.Data.SqlClient;
using System.Data;

namespace ElingOA6_Admin_DSJCJ.DAL
{
    /// <summary>
    /// PaperAnswerManager数据类
    /// </summary>
    public class PaperAnswerManager
    {


        /// <summary>
        /// 判断某主题是否存在答卷
        /// </summary>
        /// <creator>chenly</creator>
        /// <date>2013-7-25</date>
        /// <param name="paperId">题目编号</param>
        /// <returns>是否存在</returns>
        public bool ExistsByPaperId(decimal paperId)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) from t_PaperAnswerManager");
            strSql.Append(" where FPaperId=@FPaperId");
            SqlParameter[] parameters = {
					new SqlParameter("@FPaperId", SqlDbType.Decimal)
			};
            parameters[0].Value = paperId;

            return DbHelperSQL.Exists(strSql.ToString(), parameters);
        }

    }
}
